#include <stdio.h>

int main(int argc, char *argv[]) {
        if(argc > 1 && !strcmp(argv[1],"start")) {
                system("/bin/launchctl load -w /Library/LaunchDaemons/com.bantha-fodder.idyndnsd.plist");
        } else if(argc > 1 && !strcmp(argv[1],"stop")) {
                system("killall idyndnsd");
                system("/bin/launchctl unload -w /Library/LaunchDaemons/com.bantha-fodder.idyndnsd.plist");
        } else {
                printf("Usage: %s [start|stop]\n", argv[0]);
        }
        return 0;
}
